#include <iostream>
#include <string>
#include <vector>
#include <chrono>
#include <sw/redis++/redis++.h>

using namespace std::chrono_literals;
using std::cout;    
using std::endl;
using std::string;
using std::vector;
using sw::redis::Redis;

void test1(Redis &redis)
{
    auto result = redis.blpop({"cmd1", "cmd2", "cmd3"}, 10s);
    if (result) 
    {
        cout << result->first << endl;
        cout << result->second << endl;
    }
}

void test2(Redis &redis)
{
    redis.lpush("cmd1", {"1", "2", "3", "4"});
    long long len = redis.llen("cmd1");
    cout << len << endl;
}


int main()
{
    Redis redis("tcp://127.0.0.1:6379");
    // test1(redis);
    test2(redis);
    return 0;
}